{extend name="public/common"} {block name="body"}
<title>基本设置</title>
</head>
<body>
  <div style="width:400px;height:200px;text-align: center;">
      <form action="/admin/recharge/excelupload" enctype="multipart/form-data" method="post" id="excelform">
        <input type="file" name="excel_file" style="margin-top: 50px; "><br/>
        <input type="button" value="导入文件" style="width:80px;height:30px;margin-top: 50px;border:0 solid #fff;border-radius: 5px;background-color: #0a6999;color:#fff" onclick="excelupload()">
      </form>
  </div>
  

{/block}{block name="js"}
 
<script type="text/javascript">
function excelupload(){

var file = $('input[name="excel_file"]').prop('files');
    
    if(file.length == 0){
      layer.alert("您还没有选择文件");
    }else{
      $("#excelform").submit(); 
     }

}
</script>
{/block}
